package com.fowo.api.model.wms.order.item;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.fowo.api.common.excel.ImageConvert;
import com.fowo.api.common.validator.EnumsString;
import com.fowo.api.sys.entity.SysFile;
import java.util.List;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/** 销售出库单子表(wms) 导入导出辅助模型 */
@Getter
@Setter
public class WmsOrderItemExcelPo {

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "父级")
  private String parentIdOrderNumber;

  @ExcelIgnore
  @ExcelProperty(value = "父级")
  private Long parentId;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "商品")
  private String productIdName;

  @ExcelIgnore
  @ExcelProperty(value = "商品")
  private Long productId;

  @Size(max = 50, message = "SKU长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "SKU")
  private String sku;

  @ExcelProperty(value = "图片", converter = ImageConvert.class)
  private List<SysFile> img;

  @Size(max = 50, message = "商品单价长度不能超过20")
  @ExcelProperty(value = "商品单价")
  private java.math.BigDecimal unitPrice;

  @ExcelProperty(value = "数量")
  private Integer count;

  @Size(max = 50, message = "商品备注长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "商品备注")
  private String customization;

  @ExcelProperty(value = "库存成本 (总计)")
  private java.math.BigDecimal stockCost;

  @EnumsString(
    value = { "普通商品", "捆绑产品", "捆绑产品拆分子产品" },
    message = "捆绑类型的可用值为 “普通商品”, “捆绑产品”, “捆绑产品拆分子产品” 其中之一"
  )
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "捆绑类型")
  private String bundleType;

  @Size(max = 50, message = "MSKU长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "MSKU")
  private String sellerSku;

  @Size(max = 50, message = "币种长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "币种")
  private String currencyCode;

  @ExcelProperty(value = "分摊运费 (总计)")
  private java.math.BigDecimal apportionFreight;

  @ExcelProperty(value = "分摊运费 (单个)")
  private java.math.BigDecimal apportionFreightSingle;

  @Size(max = 50, message = "物流运费币种长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "物流运费币种")
  private String logisticsFreightCurrencyCode;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "仓位")
  private String whbIdStorageBin;

  @ExcelIgnore
  @ExcelProperty(value = "仓位")
  private Long whbId;

  @DateTimeFormat("yyyy年MM月dd日")
  @ExcelProperty(value = "订单结算时间")
  private java.util.Date orderSettlementTime;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "配货情况")
  private String distributionSituation;

  @Size(max = 50, message = "参考号长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "参考号")
  private String referenceId;
}
